package weixinkeji.dev.dc.base.scheme.promotions.h.common;

import com.alibaba.fastjson.JSON;
import sys.wx.ann.hm.H;
import sys.wx.ann.hm.M;
import sys.wx.c.ATR;
import sys.wx.m.db.dao.mysql.Dao;
import sys.wx.util.datetime.date.IMYDate;
import weixinkeji.dev.dc.base.scheme.promotions.bean.PromotionDay;
import weixinkeji.dev.dc.base.scheme.promotions.cache.PromotionConfigControl;

@H("view/show/promotionday")
public class PromotionDayS {

    @M("/today")//通过 view/show/promotionday/today.imy 访问
    public static String today(ATR a) {
        if (PromotionConfigControl.checkOK()) {
            a.printOne(JSON.toJSON(Dao.selectVast(PromotionDay.class, "promotion_date='" + IMYDate.toDay() + "'")));
        }
        return null;
    }

}
